home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / hypercrd / hc2_x / tcprogud.sit / TC Prog Guide / card_44045.txt < prev    next >
Text File  |  1991-02-27  |  843b  |  36 lines

  1. -- card: 44045 from stack: in
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 4755
  5. -- name: 
  6.  
  7.  
  8. -- part contents for background part 4
  9. ----- text -----
  10. For example, suppose the Student class defines a new member function called                  'set_roommate()'.  Then person[1] as defined above cannot directly accept a                set_roommate() message, since this variable was declared as a Person pointer.  Rather a CAST* must be used to identify person[1] as a Student pointer:
  11.  
  12.     ((Student*) person[1])->set_roommate();
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22. -- part contents for background part 7
  23. ----- text -----
  24. 122
  25.  
  26. -- part contents for background part 29
  27. ----- text -----
  28. 47191
  29.  
  30. -- part contents for background part 27
  31. ----- text -----
  32. Casts for type conversion
  33.  
  34. -- part contents for background part 20
  35. ----- text -----
  36. Casts for type conversion - p150